package by.msokoloff.javaweb2015.services;

import java.util.List;

import javax.persistence.metamodel.SingularAttribute;

import org.springframework.transaction.annotation.Transactional;

import by.msokoloff.javaweb2015.datamodel.Extra;

public interface ExtraService {

	Extra get(Integer id);
	
	List<Extra> getAll();

	@Transactional
	void createOrUpdate(Extra extra);

	@Transactional
	void delete(Extra extra);

	@Transactional
	void deleteAll();

	long getCount();

	List<Extra> getAll(SingularAttribute<Extra, ?> sortParam, boolean ascending, int first, int count);

}
